﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Windows.Input;
using Kent.Boogaart.HelperTrinity;

namespace DemoSupport
{
	public sealed class Step : INotifyPropertyChanged
	{
		private string _title;
		private string _header;
		private string _code;
		private string _footer;
		private ICommand _command;
		private object _commandParameter;

		public string Title
		{
			get
			{
				return _title;
			}
			set
			{
				if (_title != value)
				{
					_title = value;
					OnPropertyChanged("Title");
				}
			}
		}

		public string Header
		{
			get
			{
				return _header;
			}
			set
			{
				if (_header != value)
				{
					_header = value;
					OnPropertyChanged("Header");
				}
			}
		}

		public string Code
		{
			get
			{
				return _code;
			}
			set
			{
				if (_code != value)
				{
					_code = value;
					OnPropertyChanged("Code");
				}
			}
		}

		public string Footer
		{
			get
			{
				return _footer;
			}
			set
			{
				if (_footer != value)
				{
					_footer = value;
					OnPropertyChanged("Footer");
				}
			}
		}

		public ICommand Command
		{
			get
			{
				return _command;
			}
			set
			{
				if (_command != value)
				{
					_command = value;
					OnPropertyChanged("Command");
				}
			}
		}

		public object CommandParameter
		{
			get
			{
				return _commandParameter;
			}
			set
			{
				if (_commandParameter != value)
				{
					_commandParameter = value;
					OnPropertyChanged("CommandParameter");
				}
			}
		}

		public event PropertyChangedEventHandler PropertyChanged;

		private void OnPropertyChanged(string propertyName)
		{
			EventHelper.Raise(PropertyChanged, this, new PropertyChangedEventArgs(propertyName));
		}
	}
}
